package edu.whut.service;

import edu.whut.entity.User;

import java.util.List;

public interface UserService {
    Boolean addUser(User user);

    Boolean deleteUser(Long userId);

    Boolean updateUser(User user);

    /***
     * 功能：根据userID查询用户
     * @param userId
     * @return 用户
     */
    User getUser(Long userId);

    /***
     * 功能：根据username查询用户
     * @param username
     * @return 用户
     */
    User getUserByName(String username);

    User getUserByPhone(Long phone);

    Boolean login(Long phone, String password);

    List<User> getUsersByList(List<Long> userIds);

}
